<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    {if condition="$title"}
    <title>{$title}</title>
    {else/}
    <title>{:config('website.site_title')}</title>
    {/if}
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="{:config('website.site_keywords')}">
    <meta name="description" content="{:config('website.site_description')}">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_24081_qs69ykjbea.css">
    <link rel="stylesheet" type="text/css" href="__LIBS__/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/home.base.css" media="all">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/css/user.css" media="all">
    <link rel="shortcut icon" href="{:config('website.icon')}" />
    <link rel="bookmark"href="{:config('website.icon')}" />
    {block name="css"}
    <style type="text/css">html {background-color: #F2F2F2;}</style>
    {/block}
</head>
<body>
<div class="layui-layout ">
    <div class="layui-header header ">
        <a class="logo" href="/"> <img src="{:config('website.logo')}" alt="{:config('website.site_title')}"> </a>
        <ul class="layui-nav layui-layout-left" lay-filter="">
            <li class="layui-nav-item"><a href="/">首页</a></li>
            {foreach name="nav" item="vo"}
            <li class="layui-nav-item">
                <a href="{$vo.url}">{$vo.name}</a>
                {if condition="$vo.childNav"}
                <dl class="layui-nav-child">
                    {foreach name="vo.childNav" item="voo"}
                    <dd><a href="{$voo.url}">{$voo.name}</a></dd>
                    {/foreach}
                </dl>
                {/if}
            </li>
            {/foreach}
        </ul>
        <form class="layui-form" action="{:url('index/course/search')}" style="position: absolute;top: 18px; right:330px;" >
            <div class="layui-form-item">
                <div class="layui-input-inline" style="width:250px;">
                    <input type="text" name="keywords"   placeholder="请输入课程关键字"  class="layui-input search-input" >
                    <button type="submit" class="layui-btn  layui-btn-position"><i class="layui-icon layui-icon-search"></i></button>
                </div>
            </div>
        </form>
        {if condition="$islogin"}
        <ul class="layui-nav layui-layout-right">
            {if condition="$userInfo.is_teacher eq 1"}
            <li class="layui-nav-item ">
                <a  href="{:url('admin/index/index')}">教师中心</a>
            </li>
            {else /}
            <li class="layui-nav-item ">
                <a href="{:url('index/user/cooperate')}">教师入驻</a>
            </li>
            {/if}
            <li class="layui-nav-item ">
                <a href="{:url('index/user/index')}">个人中心</a>
            </li>
            <li class="layui-nav-item">
                <a href=""><img src="{$userInfo.avatar|defaultAvatar}" class="layui-nav-img"></a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('index/user/index')}">个人中心</a></dd>
                    <!--<dd><a href="javascript:;">安全管理</a></dd>-->
                    <dd><a href="{:url('index/user/logout')}">退了</a></dd>
                </dl>
            </li>
        </ul>
        {else /}
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item"> <a class="iconfont icon-touxiang layui-hide-xs" style="font-size:25px;margin-right:-25px;margin-top:-4px" href="{:url('index/user/login')}"></a> </li>
            <li class="layui-nav-item"> <a href="{:url('index/user/login')}"  style="margin-right:-15px">登入</a> </li>
            <li class="layui-nav-item"> <a href="{:url('index/user/reg')}"　style="margin-right:-15px">注册</a> </li>
            <span class="layui-nav-bar" style="left: 0px; top: 55px; width: 0px; opacity: 0;"></span>
        </ul>
        {/if}
    </div>
</div>
<div class="personalCTop">
    <div class="center">
        <div class="teacher_Banner">
            <div class="teacher_Banner_Img">
                <div class="teacher_Banner_Mask"></div>
                <img src="{$userInfo.avatar|defaultAvatar}" alt="{$info.title}">
            </div>
            <div class="img"><img src="{$userInfo.avatar|defaultAvatar}" alt="{$userInfo.username}"></div>
            <div class="fl c-fff font14 font">
                <p class="font26 mt10">{$userInfo.username}</p>
                <p class="mt10">{if condition="$userInfo.is_teacher eq 1"}教师身份{else /}普通用户{/if}</p>
            </div>
        </div>
    </div>
</div>
<div class="layui-container mt20 mb20">
    <div class="layui-container fly-marginTop fly-user-main">
        <ul class="layui-nav layui-nav-tree layui-bg-white">
            <li class="layui-nav-item"><a href="{:url('index/user/index')}"><i class="layui-icon layui-icon-home"></i>个人主页</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/mycourse')}"><i class="layui-icon layui-icon-video"></i>我的课程</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/myclassroom')}"><i class="layui-icon layui-icon-video"></i>我的班级</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/myfavourite')}"><i class="layui-icon layui-icon-star"></i>我的收藏</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/myorder')}"><i class="layui-icon layui-icon-form"></i></i>我的订单</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/mycoupon')}"><i class="layui-icon layui-icon-layer"></i></i>我的优惠卡</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/myinfo')}"><i class="layui-icon layui-icon-set"></i>基本资料</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/card')}"><i class="layui-icon layui-icon-rmb"></i>点卡充值</a></li>
            <li class="layui-nav-item"><a href="{:url('index/user/binding')}"><i class="layui-icon layui-icon-video"></i>绑定手机</a></li>
        </ul>
        {block name="body"}{/block}
    </div>
</div>
<div class="copyright">
    <h4 class="title">合作伙伴</h4>
    <div class="cooperation">
        <a class="mlm" href="https://www.newlogo.cn" target="_blank">新起点软件</a>
        {foreach name="link" item="vo"}
        <a class="mlm" href="{$vo.href}" target="_blank">{$vo.title}</a>
        {/foreach}
    </div>
    <h4 class="title">相关备案及证件号</h4>
    <div class="cooperation">
        <a class="mlm" href="javascript:void(0);" target="_blank">Copyright © 2018 - 2019 {:config('website.site_copyright')} 版权所有</a>
        <a class="mlm" href="http://www.miibeian.gov.cn/" target="_blank">{:config('website.site_icp')}</a>
        <a class="mlm" href="javascript:void(0);" target="_blank">{:config('website.site_code')}</a>
    </div>
</div>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base.js"></script>
<script type='text/javascript'>
    $(document).ready(function (){
        $("li").each(function(index){
            $(this).click(function(){
                $("li").removeClass("active");
                $("li").eq(index).addClass("active");
            });
        });
    });
</script>
{block name="js"}
{/block}
</body>
</html>